﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace tsgl
{
    public partial class huanying : Form
    {
        public huanying(string text)
        {
            InitializeComponent();
            this.label2.Text=text+"同志";
            this.label2.Left = (this.Width - label2.Width) / 2;
            this.label1.Left = (this.Width - label1.Width) / 2; 
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            this.timer2.Enabled = false;
            this.timer1.Enabled = true;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            this.Opacity = this.Opacity - 0.08;
        }

        private void timer3_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            timer3.Enabled = false;
            this.Dispose();
        }

        private void huanying_Load(object sender, EventArgs e)
        {
            Rectangle ScreenArea = System.Windows.Forms.Screen.GetBounds(this);
            int width1 = ScreenArea.Width; //屏幕宽度 
            int height1 = ScreenArea.Height; //屏幕高度
            this.Location = new System.Drawing.Point(width1 - this.Width, height1 - this.Height); 
        }

        private void huanying_MouseEnter(object sender, EventArgs e)
        {
            this.pictureBox1.Visible = true;
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void huanying_MouseLeave(object sender, EventArgs e)
        {
           // this.pictureBox1.Visible = false;
        }

        private void pictureBox1_MouseEnter(object sender, EventArgs e)
        {
           // this.pictureBox1.Visible = true;
        }
    }
}